/*
 * @Author: lrren01
 * @Date: 2024-08-15 09:54:01
 * @LastEditors: lrren01
 * @LastEditTime: 2024-09-18 11:29:45
 * @Description: 
 */
import { Settings } from "../types";
import * as monaco from 'monaco-editor';
import Editor, { loader } from '@monaco-editor/react';

loader.config({ monaco });

interface Props {
  code: string;
  setCode: React.Dispatch<React.SetStateAction<string>>;
  settings: Settings;
}

function CodeTab({ code, setCode, settings }: Props) {
  
  return (
    <div className="relative h-full flex flex-col">
      <Editor
        defaultLanguage="html" 
        defaultValue="" 
        value={code}
        onChange={(value) => {
          setCode(value as string)
        }}
      />
    </div>
  );
}

export default CodeTab;
